﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace RepertorySystem.Models {
    public class OutputStorage {
        [Display(Name = "ID")]
        public int ID { get; set; }


        [Display(Name = "书名")]
        [Required]
        [Range(0, 100000)]
        public int Book_Id { get; set; }

        [Display(Name = "数量")]
        [Required]
        [Range(0, 100000)]
        public int Number { get; set; }


        [Display(Name = "时间")]
        [Required]
        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime Time { get; set; }


        [Display(Name = "价格")]
        [Required]
        [Range(-100000, 100000)]
        public int Price { get; set; }


    }

    public class OutputStorageDbContext : DbContext {
        public DbSet<OutputStorage> OutputStorages { get; set; }
    }
}